import Vue from 'vue'
import component from './component.vue'
import store from '../../store'
import {$get} from '@/common/ajax/index'

export default async function popup () {
  const list = (await $get('coupon/getRemindCouponByUserid')).obj || []
  if (list.length == 0) return
  const el = document.createElement('div')
  document.body.appendChild(el)
  const $vm = new Vue({
    store,
    el,
    data: {
      list
    },
    template: '<c :list="list"/>',
    components: {c:component}
  })
}
